import request from '@/utils/request'

// 获取用户列表
export function getSysUserList (params) {
  return request({
    url: 'sys/getSysUserList',
    method: 'post',
    params
  })
}
// 获取用户详情
export function getUserDetail (params) {
  return request({
    url: 'sys/getSysUserInfo',
    method: 'post',
    params
  })
}

// 删除用户
export function deleteUser (params) {
  params.type = 1
  return request({
    url: 'sys/deletedSys',
    method: 'post',
    params
  })
}

// 添加用户
export function addUser (params) {
  return request({
    url: 'sys/no',
    method: 'post',
    params
  })
}

// 修改用户
export function updateUser (params) {
  return request({
    url: 'sys/updateSysUserInfo',
    method: 'post',
    params
  })
}

// 获取角色列表
export function getSysRoleList (params) {
  return request({
    url: 'sys/getSysRoleList',
    method: 'post',
    params
  })
}

// 添加用户信息后，创建账户
export function createSysAccount (params) {
  return request({
    url: 'user/addUser',
    method: 'post',
    params
  })
}
